<?php
/**
 * HCAPIService.php
 * description:
 * Created by www.
 * User: SCF
 * Date: 2018/9/13 11:51
 *
 */

namespace App\Services\ThirdAPI;



class HCAPIService
{
    protected $apiName = 'HC';
    /*
     * 代理商获取电竞用户历史投注数据
     * @param int lastId
     * @return array
     */
    public function bets($lastId = 0)
    {
        $lastId = !empty($lastId) ? $lastId : 0;
        $data = [
            'api_name' => $this->apiName,
            'last_id' => $lastId
        ];
        $url = config('app.rpcserver') . "/api/getOrders";
        $res = GameApiService::request($url,'get',$data);
        amount_format_array($res,['bet_money','prize_money','winloss_money','contribute_money','bonus_money','valid_money'],true);
        return $res;
    }
}